// FinalProject.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "RigidBody.h"
#include "OpenGLApp.h"

banknamespace::OpenGLApp* g_pApp = 0;

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
	UNREFERENCED_PARAMETER(hPrevInstance);
	UNREFERENCED_PARAMETER(lpCmdLine);

 	// TODO: Place code here.
	try
	{
		g_pApp = new banknamespace::OpenGLApp( hInstance, nCmdShow );
	}
	catch (banknamespace::OpenGLApp::InitFailed )
	{
		MessageBox( NULL, TEXT("Couldn't initailize application window."),
			TEXT("Application Error"), MB_OK | MB_ICONERROR );
		exit(1);
	}

	int result = g_pApp->RunMainLoop();

	delete g_pApp;
	g_pApp = 0;
	
	assert( _CrtCheckMemory() );
	_CrtDumpMemoryLeaks();
}



